package com.scu.phototabuser.ui.navitems;

import android.os.Bundle;
import android.preference.PreferenceFragment;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;

import com.scu.phototabuser.R;
import com.scu.phototabuser.ui.taskgroup.ChooseGroupActivity;

/**
 * Created by tianfei on 2017/5/10.
 */

public class Settings extends AppCompatActivity {


    private Toolbar toolbar;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.settings);

        toolbar=(Toolbar)findViewById(R.id.tool_bar);
        toolbar.setTitle(getString(R.string.action_settings));
        toolbar.setTitleTextColor(ContextCompat.getColor(Settings.this,R.color.colorAccent));
        setSupportActionBar(toolbar);

        getFragmentManager().beginTransaction()
                .replace(R.id.settings_container, new SettingsFragment())
                .commit();
    }


    public static class SettingsFragment extends PreferenceFragment {
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);

            // Load the preferences from an XML resource
            addPreferencesFromResource(R.xml.preferences);
        }
    }
}
